//图片上传预览    IE是用了滤镜。
        function previewImage(file,WIDTHS,HEIGHTS,DIVNAME,NAME)
        {
          var MAXWIDTH  = 60; 
          var MAXHEIGHT = 60;
		   MAXWIDTH  = WIDTHS; 
           MAXHEIGHT = HEIGHTS;
          var div = document.getElementById(DIVNAME);
          if (file.files && file.files[0])
          {
              div.innerHTML ='<img id='+NAME+'>';
			  var img = document.getElementById(NAME);
              img.onload = function(){
                img.width  =  MAXWIDTH;
                img.height =  MAXHEIGHT;
               //img.style.marginLeft = rect.left+'px';
               // img.style.marginTop = rect.top+'px';
              }
              var reader = new FileReader();
              reader.onload = function(evt){img.src = evt.target.result;}
              reader.readAsDataURL(file.files[0]);
          }
          else //兼容IE
          {
            var sFilter='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
            file.select();
            var src = document.selection.createRange().text;
            div.innerHTML = '<img id=imghead>';
            var img = document.getElementById('imghead');
            img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
           
            div.innerHTML = "<div id=divhead style='width:"+MAXWIDTH+"px;height:"+MAXHEIGHT+"px;margin-top:0px;"+sFilter+src+"\"'></div>";
          }
        }